The integrity of an execution of a code indicates that intended (i.e. correct) instructions within a fragment of the code are executed in an intended (i.e. correct) sequence. Moreover, the integrity of an execution of a code indicates that only intended (i.e. correct or valid) paths between fragments of the code are executed. In other words, the integrity indicates that an actual program flow of the executed code is identical to an intended program flow of the code. The execution of a code may be manipulated in many ways. For example, the execution may be manipulated physically by applying a defined amount of energy to a semiconductor circuit executing the code (integrity attack). For example, an electric or an electromagnetic pulse may be applied to the semiconductor circuit. Further, light pulses may be applied to the semiconductor circuit (e.g. by means of a laser). The energy input may cause a bit flip in the executed code, so that a course of the execution may be changed.
As a precaution, hardware executing the code may be provided such that external physical manipulation is detected. Furthermore, measures on software level may be taken to ensure code and data integrity. For example, code fragments having the same or a like functionality may be executed in parallel and the results may be compared, which requires the code of a software program to be programmed in a proprietary style. However, using such individual measures without an embedded security architecture may consume a lot of resources (e.g. in terms program development time, memory consumption or processing power to implement a function of similar output twice).